﻿using System.Runtime.Serialization;

namespace YunBox2.Contracts.FoundationModels
{
    /// <summary>
    /// 纸箱
    /// </summary>
    [DataContract]
    public class Carton : Goods
    {
        [DataMember]
        private CartonType _cartonType;
        [DataMember]
        private BoardMaterial _boardMaterial;
        [DataMember]
        private double _height;
        [DataMember]
        private double _length;
        [DataMember]
        private double _width;

    
        public virtual CartonType CartonType
        {
            get
            {
                return _cartonType;
            }
            set
            {
                if (_cartonType != value)
                {
                    _cartonType = value;
                    RaisePropertyChanged("CartonType");
                }
            }
        }


        public virtual BoardMaterial BoardMaterial
        {
            get
            {
                return _boardMaterial;
            }
            set
            {
                if (_boardMaterial != value)
                {
                    _boardMaterial = value;
                    RaisePropertyChanged("BoardMaterial");
                }
            }
        }

        /// <summary>
        /// 纸箱高度(cm)
        /// </summary>

        public virtual double Height
        {
            get
            {
                return _height;
            }
            set
            {
                if (_height != value)
                {
                    _height = value;
                    RaisePropertyChanged("Height");
                }
            }
        }

        /// <summary>
        /// 纸箱长度(cm)
        /// </summary>

        public virtual double Length
        {
            get
            {
                return _length;
            }
            set
            {
                if (_length != value)
                {
                    _length = value;
                    RaisePropertyChanged("Length");
                }
            }
        }

        /// <summary>
        /// 纸箱宽度(cm)
        /// </summary>
    
        public virtual double Width
        {
            get
            {
                return _width;
            }
            set
            {
                if (_width != value)
                {
                    _width = value;
                    RaisePropertyChanged("Width");
                }
            }
        }
    }
}